package org.leo.study.logtrace.models.sys.controller;

import lombok.extern.slf4j.Slf4j;
import org.leo.study.logtrace.common.service.IdService;
import org.leo.study.logtrace.models.sys.service.SysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统服务接口
 * </p>
 *
 * @Package: org.leo.study.models.sys
 * @ClassName: SysController
 * @author: Li.Junlin
 * @date: 2019.10.10 11:04
 */
@Slf4j
@RestController()
@RequestMapping("/sys")
public class SysController {

    @Autowired
    private SysService sysService;

    @Autowired
    private IdService idService;

    /**
     * 用户查询接口
     *
     * @return
     */
    @GetMapping("/userSelect")
    public String userSelect() {
        log.info("用户查询~1 id：{}", idService.snowflakeId());
        return sysService.userSelect();
    }
}
